package com.run.motion.service.impl;

import java.util.List;

import com.run.motion.entity.GymEquipment;
import com.run.motion.mapper.GymEquipmentMapper;
import com.run.motion.service.IGymEquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 健身器材Service业务层处理
 * 
 * @author lyq
 * @date 2022-03-26
 */
@Service
public class GymEquipmentServiceImpl implements IGymEquipmentService
{
    @Autowired
    private GymEquipmentMapper gymEquipmentMapper;

    /**
     * 查询健身器材
     * 
     * @param id 健身器材主键
     * @return 健身器材
     */
    @Override
    public GymEquipment selectGymEquipmentById(Long id)
    {
        return gymEquipmentMapper.selectGymEquipmentById(id);
    }

    /**
     * 查询健身器材列表
     *
     * @return 健身器材
     */
    @Override
    public List<GymEquipment> selectGymEquipmentList()
    {
        return gymEquipmentMapper.selectGymEquipmentList();
    }

    /**
     * 新增健身器材
     * 
     * @param gymEquipment 健身器材
     * @return 结果
     */
    @Override
    public int insertGymEquipment(GymEquipment gymEquipment)
    {
        return gymEquipmentMapper.insertGymEquipment(gymEquipment);
    }

    /**
     * 修改健身器材
     * 
     * @param gymEquipment 健身器材
     * @return 结果
     */
    @Override
    public int updateGymEquipment(GymEquipment gymEquipment)
    {
        return gymEquipmentMapper.updateGymEquipment(gymEquipment);
    }

    /**
     * 批量删除健身器材
     * 
     * @param ids 需要删除的健身器材主键
     * @return 结果
     */
    @Override
    public int deleteGymEquipmentByIds(Long[] ids)
    {
        return gymEquipmentMapper.deleteGymEquipmentByIds(ids);
    }

    /**
     * 删除健身器材信息
     * 
     * @param id 健身器材主键
     * @return 结果
     */
    @Override
    public int deleteGymEquipmentById(Long id)
    {
        return gymEquipmentMapper.deleteGymEquipmentById(id);
    }
}
